package StudyCode.summary.mydatetime;

import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.Temporal;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class YMDHMS {
	public static void main(String[] args) {
		ZonedDateTime zdt = ZonedDateTime.now();
		format(zdt, "yyyy/MM/dd VV");
	}

	private static void format(Temporal co, String pattern) {
		DateTimeFormatter fmt = DateTimeFormatter.ofPattern(pattern);
		String str = fmt.format(co);
		System.out.println(pattern + ": " + str);
	}
}
